package com.ap.core.domain;


import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import org.hibernate.annotations.TypeDef;

import com.ap.core.cxf.jaxb.common.ActivationStatus;

/**
 * User: Ranjit.Singh
 */
@Entity
@Table(name = "T_ZAPP_CONSUMER")
@AttributeOverride(name = "id",column = @Column(name = "ZAPP_CONSUMER_ID"))
@TypeDef(name = "id", typeClass = Long.class)
public class ZappConsumer extends Identifiable<Long> {

	private static final long serialVersionUID = -737489237489237L;

	@Column(name = "FI_CUSTOMER_ID")
    private String fiCustomerId;

    @Column(name = "ZAPP_ID")
    private Long zappId;

    @Column(name = "STATUS_CODE")
    @Enumerated(EnumType.STRING)
    private ActivationStatus statusCode;

    @Column(name = "FI_ID")
    private Long fiId;

    private ZappConsumer(){}

    public ZappConsumer(String fiCustomerId, Long fiId, Long zappId) {
        this.fiCustomerId = fiCustomerId;
        this.fiId = fiId;
        this.statusCode = ActivationStatus.ACTIVE;
        this.zappId = zappId;
    }

    public String getFIConsumerId() {
        return fiCustomerId;
    }

    public Long getFIId() {
        return fiId;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public ActivationStatus getStatusCode() {
        return statusCode;
    }

    public Long getZappId() {
        return zappId;
    }
}
